﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Acoris.Rendering
{
    using Acoris.Media;
    using Acoris.Foundation;

    /// <summary>
    /// 表示渲染格式
    /// </summary>
    public sealed class RenderFormat
    {

        #region Layout

        /// <summary>
        /// 
        /// </summary>
        public Thickness Margin { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Thickness Padding { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public HorizontalAlignment HorizontalAlignment { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public HorizontalAlignment HorizontalContentAlignment { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public VerticalAlignment VerticalContentAlignment { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public VerticalAlignment VerticalAlignment { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int GridColumn { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int GridRow { get; set; }
        #endregion

        #region Appearance

        /// <summary>
        /// 
        /// </summary>
        public float Opacity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Brush Background { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Brush Foreground { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Brush BorderBrush { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Transform Transform { get; set; }

        #endregion

        #region Text

        /// <summary>
        /// 
        /// </summary>
        public float FontSize { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public float TopLineGap { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public float BottomLineGap { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public FontFace FontFamily { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public FontStyle FontStyle { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public FontWeight FontWeight { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int IndentCount { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public float IndentIncreament { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool FirstLineIndent { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public float LineHeight { get; set; }
        #endregion

        #region List Style

        /// <summary>
        /// 
        /// </summary>
        public bool EnableDecorationStyle { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Thickness DecorationHeaderMargin { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Thickness ListContentMargin { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Thickness ListContentPadding { get; set; }

        #endregion

        #region Table Style



        #endregion

        #region Geometry Style        

        /// <summary>
        /// 
        /// </summary>
        public StrokeStyle StrokeStyle { get; set; }

        #endregion

        public static RenderFormat GetDefaultFormat()
        {
            var weight = 0;
#if WIN2D && NET_UWP
            weight = Windows.UI.Text.FontWeights.Normal.Weight;
#endif
            return new RenderFormat
            {
                Foreground = new SolidColorBrush(new Color(0, 0, 0)),
                FontSize = 15,
                FontFamily = new FontFace("Segoe UI"),
                FontStyle = FontStyle.Normal,
                FontWeight = new FontWeight { Weight = weight },

            };
        }
    }
}
